'\" t
.TH mco 1 "14 May 2008" "Code Manager II"

.SH NAME
mco \- Check out existing files for editing

.SH SYNOPSIS
.TS
l.
mco [\fB--verbose\fP] [\fB--version\fP \fIV\fP] [\fB--force-write\fP]
    file|directory ...
.TE

.SH DESCRIPTION
The \fBmco(1)\fP utility allows files that are currently under code control to be
checked out for editing by the invoker. The files mentioned will then be locked for editing
for that user and no other users can check out the same files until the original
person checks them back in again.

For each file that is checked out a message will be shown indicating the version that
has been checked out for editing.

.SH ARGUMENTS
.TP 8
.B --verbose
Show more information regarding the check-out process.
.TP
.B --version
Check out the specified version. The version can be specified in the format of "N.N" to
indicate the local repository version, or the hex string to represent the global unique 
version number of the file.

Note: \fB--revision\fP or \fB--id\fP can be used in place of \fB--version\fP if desired.
.TP
.B --force-write
Forces the check out of the file when the current project has a \fBPROTECTION\fP setting
of "force-write". If such a \fBPROTECTION\fP setting is present, but this argument is
not specified then the check-out of the file will be aborted.

This option must also be used if the current contents of the file, if the file
exists in the current directory, do not match any previously checked in version
of the code. This ensures that the if you overwrite a file that can not subsequently
be retrieved you knew what you were doing!

.SH DIRECTORY HANDLING
If a directory is encountered in the list of objects to check out then the 
handling of the command changes a little. In this instance all files in all 
sub-directories of the given directory are added to the command line and treated
as files to check out. However any file that is already checked out will be
silently ignored. If just files are specified on the command line a error
would have been given in such a case.

The list of files to check out taken from the directories are filtered through
any ignored patterns. Any files that are not under code control are also 
silently ignored when handling directories.

.SH EXIT CODES
The \fIcm2_mco(1)\fP follows UNIX standard practise:

.TP 4
.B 0
One or more files were successfully checked out.
.TP
.B >0
An error occured whilst attempting to check out the specified files.

.SH NOTES

.SS Checking out older revisions
The \fBCode Manager II\fP tool set attempts to keep things as simple as possible. Hence if an
older revision is checked out for editing it will \fBnot\fP causing any 'branching' to 
occur - all editions and updates are purely linear.

If a branching/merging scheme is needed then the approach to take is to copy the whole project 
and then merge the newer project back in to the base project when appropriate.

.SH AUTHOR
The \fBCode Manager II\fP tool set was written by Simon Edwards, Proprius Consulting Ltd, (\fBwww.proprius.co.uk\fP).

.SH SEE ALSO
.BR cm2_cpproject(1),
.BR cm2_mget(1),
.BR cm2_mci(1),
.BR cm2_munlock(1),
.BR cm2_status(1)

.SH AVAILABILITY
This utility was specifically written under the GNU GPL license and as required
by such software comes with \fIno warranty or guarantee of any kind\fP.

